export const refleshData = ()=>{
	let data = [{img:'https://tse4-mm.cn.bing.net/th/id/OIP-C.dkgNdvM9taM_ld-j5pPyOQHaKs?w=204&h=294&c=7&r=0&o=5&pid=1.7',msg:'1'},
					{img:'https://tse2-mm.cn.bing.net/th/id/OIP-C.KAmu_DpqH70iBJfqf1H8CwHaEK?w=204&h=115&c=7&r=0&o=5&pid=1.7',msg:'2'},
					{img:'https://tse1-mm.cn.bing.net/th/id/OIP-C.I_lEYAoJce2f-xTxJe5XtwHaGl?w=204&h=181&c=7&r=0&o=5&pid=1.7',msg:'3'},
					{img:'https://tse4-mm.cn.bing.net/th/id/OIP-C.SHeRlirRfIw_m5Sv3U8VOAAAAA?w=198&h=315&c=7&r=0&o=5&pid=1.7',msg:'4'}]
	return data
}

export const setHistoryKeys = (newKey)=>{
	let historySearchKeys = uni.getStorageSync('historySearchKeys') || []
	if(Array.isArray(historySearchKeys) && historySearchKeys[0] !== newKey){
		let newHistorySearchKeys = [newKey,...historySearchKeys]
		while(newHistorySearchKeys.length>15) {
			newHistorySearchKeys.pop()
		}
		uni.setStorageSync('historySearchKeys',newHistorySearchKeys)
	}
}